{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "Chapter 11\n",
    "# 用Seaborn生成热图\n",
    "Book_1《编程不难》 | 鸢尾花书：从加减乘除到机器学习"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [],
   "source": [
    "# 导入包\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-07-10T14:24:35.771400Z",
     "end_time": "2024-07-10T14:24:35.776776Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "     sepal_length  sepal_width  petal_length  petal_width    species\n0             5.1          3.5           1.4          0.2     setosa\n1             4.9          3.0           1.4          0.2     setosa\n2             4.7          3.2           1.3          0.2     setosa\n3             4.6          3.1           1.5          0.2     setosa\n4             5.0          3.6           1.4          0.2     setosa\n..            ...          ...           ...          ...        ...\n145           6.7          3.0           5.2          2.3  virginica\n146           6.3          2.5           5.0          1.9  virginica\n147           6.5          3.0           5.2          2.0  virginica\n148           6.2          3.4           5.4          2.3  virginica\n149           5.9          3.0           5.1          1.8  virginica\n\n[150 rows x 5 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>sepal_length</th>\n      <th>sepal_width</th>\n      <th>petal_length</th>\n      <th>petal_width</th>\n      <th>species</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>5.1</td>\n      <td>3.5</td>\n      <td>1.4</td>\n      <td>0.2</td>\n      <td>setosa</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>4.9</td>\n      <td>3.0</td>\n      <td>1.4</td>\n      <td>0.2</td>\n      <td>setosa</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>4.7</td>\n      <td>3.2</td>\n      <td>1.3</td>\n      <td>0.2</td>\n      <td>setosa</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>4.6</td>\n      <td>3.1</td>\n      <td>1.5</td>\n      <td>0.2</td>\n      <td>setosa</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>5.0</td>\n      <td>3.6</td>\n      <td>1.4</td>\n      <td>0.2</td>\n      <td>setosa</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>145</th>\n      <td>6.7</td>\n      <td>3.0</td>\n      <td>5.2</td>\n      <td>2.3</td>\n      <td>virginica</td>\n    </tr>\n    <tr>\n      <th>146</th>\n      <td>6.3</td>\n      <td>2.5</td>\n      <td>5.0</td>\n      <td>1.9</td>\n      <td>virginica</td>\n    </tr>\n    <tr>\n      <th>147</th>\n      <td>6.5</td>\n      <td>3.0</td>\n      <td>5.2</td>\n      <td>2.0</td>\n      <td>virginica</td>\n    </tr>\n    <tr>\n      <th>148</th>\n      <td>6.2</td>\n      <td>3.4</td>\n      <td>5.4</td>\n      <td>2.3</td>\n      <td>virginica</td>\n    </tr>\n    <tr>\n      <th>149</th>\n      <td>5.9</td>\n      <td>3.0</td>\n      <td>5.1</td>\n      <td>1.8</td>\n      <td>virginica</td>\n    </tr>\n  </tbody>\n</table>\n<p>150 rows × 5 columns</p>\n</div>"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 从seaborn中导入鸢尾花样本数据\n",
    "iris_sns = sns.load_dataset(\"iris\")\n",
    "iris_sns"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-07-10T14:24:35.776776Z",
     "end_time": "2024-07-10T14:24:35.804668Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "<Axes: >"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": "<Figure size 640x480 with 2 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAd0AAAGiCAYAAACiSRx6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/SrBM8AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAzxUlEQVR4nO3deXgUVb7/8U8I6SQQCBAWERBBZDFEtiiGZQR0FJ2fgHjdRnEEMZEroI7cQUERBcQRRIWoRGVA3AcERvSquA3qlUVBEJQ1LAZQwhoIku4s9fvD0NMti9WY7lPVeb+eh2dMdVfVZ9LpPv09deqcGMuyLAEAgLCrYjoAAACVBY0uAAARQqMLAECE0OgCABAhNLoAAEQIjS4AABFCowsAQITQ6AIAECE0ugAARAiNLgAANv3444/KyspSx44d1atXL82aNSuk/auGJxYAANHn7rvv1plnnql58+Zp8+bNGjFihBo1aqQ//vGPtvan0gUAwIaCggKtWrVKQ4YM0dlnn61LL71U3bt315IlS2wfg0YXAAAbEhISlJiYqHnz5qm4uFhbtmzRypUr1aZNG9vHiGGVIQBAZebz+eTz+YK2eTweeTye4547b948jRs3Tl6vV6Wlperfv78mTpxo+1y2r+laKx6yfVCE1/62g01HQLnRr/1oOgICfPP6GtMRUG7ZotvCfo7XYlpVyHH2TR2q7OzsoG1Dhw7VsGHDjntubm6uevbsqYEDB2rTpk0aN26cMjIy1KdPH1vnYiAVAMCVqlTQBdKsrCwNHDgwaNuJqtwlS5Zo7ty5Wrx4sRISEpSWlqbdu3frueeeC0OjWzPJ9lMRXj8dqWM6AvyodAG3O1lX8q+tXbtWTZs2VUJCgn/beeedp+nTp9s+F5UuAMCVKqrStat+/fravn27fD6fv5HesmWLGjdubPsYjF4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FBJSYl/2549e5SQkKCaNWvaOgaNLgAANrRp00ZVq1bVqlWr/NtWrFihtLQ0Valirzml0QUAwIbExET169dPY8eO1bfffquPPvpI//jHP3TLLbfYPkaMZVnum0cLAAADjh49qrFjx2rRokVKSkrSbbfdpltvvdX2/jS6AABECN3LAABECI0uAAARQqMLAECEhK3RLS4u1rRp03TJJZeobdu26tGjhyZOnKjCwsJwnTLIgAEDNG3atJAfq2jvvfee9u3bJ+mXqcYGDBgQkfOejJNfl4o6RqtWrbRs2TJJ0r59+/Tee++d8DGTevXqpVatWvn/paamqnfv3po1a5btY+Tl5Wnx4sW2njtv3jz16tUr5McqWmDmHTt2qFWrVtqxY0dEzm2Hk14Xu37rGPfdd5/uu+8+SZJlWXr11VdP+BgiI2wzUk2ePFlffvmlxo8fryZNmigvL08TJkzQ9u3bNX369HCd1lF27typu+++Wx9//LHpKH7R8LpMmzZNcXFxtp47efJkWZalK664IsypQjdq1ChdeeWVkqSSkhItXbpUo0ePVq1atdSvXz9b+1944YW6+OKLw5y04rghs9telyuvvFI9evSw9dyvvvpKjzzyiG666abwhsJJha3SnT9/vu666y5lZGSocePGysjI0NixY/Xpp58qPz8/XKd1FCcODI+G16VWrVqqXr26rec68TU4pkaNGqpXr57q1aunhg0b6uqrr1ZGRoYWLVpkOlql5rbXJSEhwdZE+5Kz3w+VRdga3ZiYGC1dujRouaMOHTro3XffVe3yNUh9Pp/Gjx+vzp07q3PnzhoxYoQOHjwo6T9dTwsXLlT37t2Vnp6u8ePH+6ffsixL06dPV69evdS2bVt169btuFUi7HrjjTfUq1cvdejQQQMGDNCGDRv8j/Xq1UuvvvqqrrvuOqWlpalv375au3at//G8vDzdeuutateuna666irNmDHD39VzySWX+P933rx5kn7p3n344YfVsWNHdenSRTNnzjytzKfLqa/LrFmz1L9/f//Pb7/9tlq1aqW8vDxJ0pEjR9S2bVtt3779uO7l7OxsZWRkqHPnzpozZ45/+7Rp0zR//nzNnz8/qPvt66+/1lVXXaW0tDTdfPPN2rlz52n8JsOjatWq/iresiw988wz6tatm9LT03XHHXdo165dkn7pFly+fLmys7P9lyxWrFihG2+8Ue3atVP79u11++23n9YXqY0bN2rAgAE6//zzdfnllwd1R06bNk333nuvHnroIXXs2FEZGRl64YUX/I+XlZVp8uTJ/r+dZ599Vn/84x+1bNmyE2aWpI8++kiXXnqp2rVrpzvuuEMFBc5bEzfSr8uBAwfUpk0bbdy4UdIvnxvt27fX1KlT/c+599579eSTTx7Xvfz111+rX79+Ov/883XXXXfp6NGjkn557x6bxCHwMkthYaHuuecetWvXTj169NDChQsr4leGkwhbo3vLLbfo5ZdfVq9evfTQQw/pgw8+UFFRkVq0aOH/450yZYrWrl2rF154QbNnz1ZhYaHuuuuuoONkZ2frySefVHZ2thYtWuT/sF2wYIFeeuklTZgwQe+//77uvPNOTZs2Td99911IOT/55BNlZ2frwQcf1Pz589WpUyfdcsstQW/8adOmKTMzU2+//bZq1Kih8ePHS/ql6ykrK0s1a9bUW2+9pczMzKAG5lgDMGfOHH931TfffKO4uDgtWLBAmZmZeuyxx5Sbmxvib/f0OfV16datm9avX6/Dhw9L+qUbLCYmRitXrvT/3LBhQzVt2jRovzfffFOzZ8/Wo48+qlmzZumtt97yPzZo0CBdccUVuuKKKzR37lz/9jlz5uiBBx7Q3LlzVVBQoMmTJ5/mb7PiFBcXa9GiRfq///s//5e1V155RQsXLtQTTzyhN998UykpKRo0aJCKi4s1evRodejQQYMGDdK0adN0+PBhZWVlqWvXrnrnnXc0Y8YM/fDDD3r++edDylFUVKTbb79dnTp10ttvv62RI0fq2Wef1YIFC/zP+eCDDxQfH6/58+frtttu0+TJk7V161ZJUk5OjhYsWKAnnnhCM2fO1L///W//F6dfZz5m/vz5mjJlimbPnq3vvvsuqBE3zdTrUrt2baWmpmr58uWSpDVr1qioqMj/frAsS0uWLFH37t2D9tu/f7+ysrLUpUsXLViwQC1atND7778vSWrYsKH/9/7FF1/414T98MMPlZqaqnfeeUdXXHGFRo0a5X8fIgysMPrXv/5lXX/99Vbr1q2tli1bWh06dLDmzp1rWZZl/fzzz1Zqaqq1fv16//MLCgqs1q1bW+vXr7fy8vKsli1bWh9++KH/8blz51oXXXSRVVZWZi1ZssT69NNPg87XtWtXa/78+ZZlWdbNN99sTZ069YS5Ah+78cYbrdmzZwc9fvXVV/u39ezZ03rsscf8j3300UdWamqqZVmW9fnnn1vt27e3Dh8+7H988uTJVs+ePS3Lsvz/H/Ly8izLsqypU6da3bt3t8rKyvzPT09Pt959993f+E1WLKe+Ln/4wx+sTz75xLIsy7r88sut22+/3RozZoxlWZY1YcIE6+GHHz7uGP3797eys7P9x9i0aZPVsmVLa+nSpZZlWdbIkSOtkSNH+h9v2bKl9cYbb/h/njVrltW7d2/7v7wK0rNnT6tt27ZW+/btrfbt21utW7e22rdvbz3++OP+5/zhD3+wPv74Y//PJSUl1kUXXeTfFvh7yM/Pt2bMmBH0tzV58mTrlltusSzLst566y3/3+WvBT72z3/+07r66quDHp89e7Z/29SpU62uXbtaJSUl/scvvPBC6+2337Ysy7K6detmzZkzx/9Ybm5u0OsRmPnY39Lnn3/uf/6ECROs22677bd/gWHipNdlypQp1rBhwyzLsqycnBzr9ttvt9q3b2+VlJRY69atszp16mQVFxcHHeOVV16xLr300qDzXXPNNf73wNKlS62WLVv6Hxs5cqR1/fXX+38+dOiQ1bJlS2vVqlWn8duDHWFd2q9Pnz7q06ePDhw4oC+++EKvvPKKRo8erVatWsnj8ai4uFg33HBD0D5lZWXatm2bUlN/Waq9Y8eO/sfatm2r/fv368CBA7rooou0evVqPfHEE8rNzdW6deu0Z8+eoG5TO3JzczVp0iRNmTLFv83r9Wrbtm3+n88++2z/fyclJam4uFiStGHDBjVr1kxJSUn+x9u3b6933333pOdr3LixYmJi/D/XqFFDXq83pMy/l1Nfl65du2r58uVKS0vT3r17NWLECD399NOSpCVLluivf/3rcfvk5ubqzjvv9P/cokULVatW7ZTnOeuss/z/beL3f8zw4cN12WWXSfplybB69eopNjZW0i/d6T/99JPuueeeoInUi4qK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myZdq8ebP+9re/afv27WrcuLH/WBMmTNCaNWv05Zdf6umnn/bfX1a7dm0tWbJEW7du1dq1a3XPPfeouLhYPp8vpKwDBw7USy+9pAULFuiHH37QpEmT9N577+mcc875zX0zMjLUsGFDPfjgg8rNzdX777+v2bNn+x9PTEyU9EuFeeTIkZByhYPTX5fatWurdevWWrhwoTp16iRJ6tSpk/73f//3hB8wknTzzTdr9uzZ+uCDD7Rx40aNHj06qHJKTEzUzp07tXv37t/zqzPi1ltv1VNPPaVPPvlE27Zt0wMPPKCVK1eqefPmkqRq1app27Zt2rdvn2rVqqVdu3ZpyZIlysvL0/PPP69FixaF/H7o06ePioqKNGbMGOXm5mrx4sWaMGGCUlJSbO0/YMAATZ06VUuWLNH69et1//33S/rPh31gZreK5OvStWtXzZ8/398dnZ6erk8//VSNGzfWGWeccdzz//SnP+no0aOaMGGCtmzZohdffFErVqzwP37sM2nt2rV0IRsStmu6Tz31lKZPn67s7Gzt2rVL1apVU7du3fTKK6/4u27vu+8+/f3vf9fw4cNVXFysCy64QM8//3xQd8eVV16prKwslZWV6cYbb1RmZqakX25AHzVqlPr27auUlBRdccUVSkxMDPpWZ8eVV16pvXv3aurUqdq7d69atGih5557Lug67slUqVJF06ZN04MPPqi+ffuqefPm6t+/vz777DNJUp06ddSnTx/dfffdGjFiREi5wsXpr8uxUcznn3++pF8+ZN54442TNrp9+/bVgQMHNG7cOBUVFSkzM1Pr168PevzOO+9Unz59tHTp0tP6nZly22236ciRIxozZowKCwvVtm1bzZgxw9+Nee2112rUqFEaPHiw5s6dq6+++krDhw9XTEyM0tLSNHLkSE2bNi2khjcpKUkvvPCCHn30UfXr10+1atXSTTfdpKysLFv7Dxo0SPn5+Ro2bJhiY2OVmZmpr7/+2t8lHZg5UrPCVbRIvi7du3fXI4884v8Set555ykhIeGk74fk5GS9+OKLGjt2rPr27asLLrhAffv29VfWrVq1UteuXXXDDTcEjWNB5Dh2ab8dO3bokksu0ccffxxUYTnJvn379P333we9AV588UUtXrzYVnecG7nhdYE5n332mdq2beufrGH//v3KyMjg7wUo56wRDC40ZMgQvfbaa9q5c6e+/PJLvfTSS+rdu7fpWIARb775pkaNGqXNmzcrNzdXY8eOVVpaGg0uUI5G93dISUnRU089pddff129e/fW6NGjdfPNN+vPf/6z6WiAEWPGjFGVKlV0ww036LrrrlNZWZmeeeYZ07EAx3Bs9zIAANGGShcAgAih0QUAIEJodAEAiBAaXQAAIoRGFwCACKHRBQAgQmh0AQCIEBpdAAAi5P8DIsIBP+lhlPgAAAAASUVORK5CYII="
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 绘制热图\n",
    "fig, ax = plt.subplots()\n",
    "\n",
    "sns.heatmap(data=iris_sns.iloc[:, 0:-1],\n",
    "            vmin=0, vmax=8,\n",
    "            ax=ax,\n",
    "            yticklabels=False,\n",
    "            xticklabels=['Sepal length', 'Sepal width',\n",
    "                         'Petal length', 'Petal width'],\n",
    "            cmap='RdYlBu_r')"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-07-10T14:24:35.804668Z",
     "end_time": "2024-07-10T14:24:36.032614Z"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
